package org.dtrd.modules.archive.entity.bean.lifeway;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.dtrd.modules.archive.entity.po.DtrdEntRdArchiveLifeway;

/**
 * @author : qiannai
 * @date: 2022/8/11 18:13
 * @describe : 睡眠质量保存接口
 */
@Data
@ApiModel(value = "睡眠质量",description = "睡眠质量")
public class LifewaySleepDTO {

    private Integer dataId;

    @ApiModelProperty("患者ID")
    private Integer patientId;

    @ApiModelProperty("睡眠质量")
    private Integer sleepQuality;

    @ApiModelProperty("起床时间SL")
    private Integer wakeUp;

    @ApiModelProperty("具体起床时间SL")
    private Integer wakeUpTimes;

    @ApiModelProperty("睡觉时间SL")
    private Integer sleep;

    @ApiModelProperty("具体睡觉时间SL")
    private Integer sleepTimes;

    @ApiModelProperty("午休时间SL")
    private Integer lunchBreak;

    @ApiModelProperty("具体午休时间SL")
    private Integer lunchBreakTimes;

    @ApiModelProperty("睡眠质量原因SL")
    private String sleepQualityReason;

    @ApiModelProperty("睡眠质量原因详情补充SL")
    private String sleepQualityReasonDetail;

    @ApiModelProperty("睡眠环境SL")
    private Integer sleepEnvironment;

    @ApiModelProperty("睡眠环境原因SL")
    private String sleepEnvironmentReason;

    @ApiModelProperty("睡眠环境原因详情补充SL")
    private String sleepEnvironmentReasonDetail;

    @ApiModelProperty("睡眠质量评分SL")
    private Integer sleepHabitsScore;

    @ApiModelProperty("睡眠质量小结SL")
    private String sleepHabitsComment;

    public LifewaySleepDTO parseFromPo(DtrdEntRdArchiveLifeway po) {
        dataId = po.getDataId();
        patientId = po.getPatientId();
        wakeUp = po.getWakeUp();
        wakeUpTimes = po.getWakeUpTimes();
        sleep = po.getSleep();
        sleepTimes = po.getSleepTimes();
        lunchBreak = po.getLunchBreak();
        lunchBreakTimes = po.getLunchBreakTimes();
        sleepQualityReason = po.getSleepQualityReason();
        sleepQualityReasonDetail = po.getSleepQualityReasonDetail();
        sleepEnvironment = po.getSleepEnvironment();
        sleepEnvironmentReason = po.getSleepEnvironmentReason();
        sleepEnvironmentReasonDetail = po.getSleepEnvironmentReasonDetail();
        sleepHabitsScore = po.getSleepHabitsScore();
        sleepHabitsComment = po.getSleepHabitsComment();
        return this;
    }
}
